This application claims the priority benefit of Taiwan application serial no. 90113161, filed May 31, 2001.
1. Field of the Invention
The invention relates in general to a coding method for a data storage medium, and more particularly, to a coding method of a multi-level memory cell.
2. Description of the Related Art
Multi-level memory cell is a kind of memory cell that comprises n (N greater than 1) bits and has 2n levels to store one of 2n codes. Each code is formed with n bits. The value of the 2n codes is 0 to 2nxe2x88x921. xe2x80x9cMulti-levelxe2x80x9d means that the memory cell can have multiple threshold voltages VT. For a certain kind of multi-level memory cell, the threshold voltage is set as one of the 2n levels for programming. The threshold voltage is then used to determine the stored code for reading. This kind of multi-level memory cell includes electrically erasable programmable read only memory (EEPROM) or mask read only memory (Mask ROM). On the other hand, for the multi-level memory cell in the dynamic random access memory (DRAM), the gate voltage is set to 2n VT, SO that the capacitor has a certain voltage, and the certain voltage is retrospectively referred to obtain the stored data for reading.
The conventional coding method of a multi-level memory cell is to arrange according to the values of 2n codes, and then correspond to each level from low to high sequentially. In FIG. 1, a multi-level memory cell with 2 bits is used as an example. In the conventional method, the codes are (11), (10), (01) and (00) with respect to the first to the fourth levels from low to high. In FIG. 2, a multi-level memory cell with 3 bits is used as an example. The codes are (111), (110), (101), (100), (011), (010), (001) and (000) with respect to the first level 201 to the eighth levels 208, from low to high.
Although the multi-level memory cell can store massive amounts of information, the large number of levels causes errors of storing another code of the level before or after the exact level of which a specified code is to be stored. Thus, the error code correction (ECC) is very important. Such error code correction compares the actual storage value to the predetermined storage value after programming the memory cell. The error address of the memory cell and the bit record requiring correction are saved into an additional memory cell.
A common error code correction rule includes a 2q+2qxe2x88x921 rule. That is, 2qxe2x88x921 additional spaces are given to store the error code correction data in each 2q bits of data of a memory, whereas, 2qxe2x88x922 bits are used to stored the address of the error memory cells and the remaining one bit is used to store the corrected bit. When the probability of the error occurrence for data storage is high, the value of q has to be reduced to increase the proportion of the error code correction memory cells ((2qxe2x88x921)/2q). That is, with the same data storage spaces, more additional spaces are consumed to store error data, and vice versa.
In FIG. 1, in the conventional coding method of a 2 bit multi-level memory cell, the bit difference between two codes of two neighboring levels is 1, 2, 1, sequentially. That is, if one mistakenly writes (01) as (10) or (10) as (01), the corrected bit number to be stored is 2. Referring to FIG. 2, in the conventional coding method of a 3 bit multi-level memory cell, the bit difference between two codes of two neighboring levels is 1, 2, 1, 3, 1, 2, 1 in sequence. The corrected bit number is even more. In the conventional coding method, more than one error bits are generated when one memory cell is wrongly written. More storage spaces of the memory are thus consumed.
The invention provides a coding method of a multi-level memory cell applied to a programming operation of a multi-level memory cell. The multi-level memory cell can store n bits and has 2n levels with respect to 2n codes. Each code comprises n bits. In the coding method, a code to be stored is provided. According to a relationship between the code and level, a specified level of the code to be stored is obtained by the multi-level memory cell. The relationship between the code and the level is a correspondence between the 2n codes and the 2n levels. Two codes of any two corresponding neighboring levels have a one bit difference.
In the above coding method of multi-level memory cell, the range of n is 2xe2x89xa6nxe2x89xa64.
The invention further provides a programming method of a multi-level memory cell. Data is written to a multi-level memory cell using the above coding method. An error code inspection step is performed. If the actual stored code of any memory cell has one bit different from the predetermined stored code, the address of this multi-level memory cell and the different bit are written into an additional error code correction memory cell.
As mentioned above, since two codes of two neighboring levels only have one bit difference, whatever n is, when a specified code of a corresponding level is mistakenly written as another code of the level right before or after such certain level, only one additional correction bit is required. The number for a correction bit is thus decreased, and the space occupied by storing the correction bit is saved.
Both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.